/**
 * 小程序体验者相关接口 
 */
var request = require('./request.js');

module.exports = {
  /**
   * 查询用户信息
   * @param openId  用户id
   */
  checkHasExperiencer: function (openId) {
    var params = {
      openId: openId,
    }
    return request.get('/newretail/api/wxa/experience/checkHasExperiencer', params)
  },

  /**
   * 插入体验者信息
   * @param {string} companyName 
   * @param {string} mobile 
   * @param {string} name 
   * @param {string} openId 
   */
  create: function (companyName, mobile, name, openId) {
    var params = {
      companyName: companyName,
      mobile: mobile,
      name: name,
      openId: openId
    }
    return request.post('/newretail/api/wxa/experience/create', params)
  }
}